package org.kl.bf.repository.basic;

import java.util.Collection;
import java.util.List;

import org.kl.bf.entity.basic.HelpDocument;
import org.kl.bf.repository.BasicRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface HelpDocumentDao extends BasicRepository<HelpDocument, String>,JpaSpecificationExecutor<HelpDocument> {
	List<HelpDocument> findById(String id);
	
	
	/**
	 * 通过父编码查找
	 * 
	 * @param pbsParentNode
	 * @return
	 */
	List<HelpDocument> findByHelpParentId(String helpParentId);

	@Query("select o from HelpDocument o where o.helpParentId is null or o.helpParentId = ''")
	List<HelpDocument> findRoot();

	List<HelpDocument> findByHelpParentIdIn(Collection<String> helpParentId);
}
